import request from './axios'

// 查询所有处置申请
export function getAllDisposalRequests() {
  return request.get('/disposal-requests')
}

// 按条件查询处置申请
export function searchDisposalRequests(params) {
  return request.post('/disposal-requests/search', params)
}

// 新增处置申请
export function addDisposalRequest(data) {
  return request.post('/disposal-requests', data)
}

// 编辑处置申请
export function updateDisposalRequest(id, data) {
  return request.put(`/disposal-requests/${id}`, data)
}

// 删除处置申请
export function deleteDisposalRequest(id) {
  return request.delete(`/disposal-requests/${id}`)
}

// 批量删除处置申请
export function batchDeleteDisposalRequests(ids) {
  return request.delete('/disposal-requests/batch', { data: ids })
}

// 通过registerId查询处置申请
export function getDisposalRequestsByRegisterId(registerId) {
  return request.get(`/disposal-requests/register/${registerId}`)
}
